home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: MegaDisc
/
MegaDisc 36 (1993-11)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).zip
/
MegaDisc 36 (1993-11)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).adf
/
ARexx
/
Modular
/
Rectangle.mod
< prev
next >
Wrap
Text File
|
1993-08-19
|
2KB
|
36 lines
/* Rectangles, filled, framed, reccessed, embossed, etc. */
Rectangle:
t = 'Enter details as shown, retaining all commas.',
'\For frame: N = None, R = Recessed, E = Embossed,',
'\or give just its colour number for a plain frame.',
'\For the fill colour, no entry (2 adjacent commas)',
"\means 'Do not fill'."
u = 'left,top,right,bottom,fill colour,frame'
s = Request(80,30,t,u,'Okay','Cancel')
if s ~= '' then do
parse var s x1 ',' y1 ',' x2 ',' y2 ',' co ',' f .
select
when datatype(f) = 'NUM' then call Plain(x1-2,y1-1,x2+2,y2+1,co)
when UPPER(f) = 'R' then call Recess(x1-2,y1-1,x2+2,y2+1,co)
when UPPER(f) = 'E' then call Emboss(x1-2,y1-1,x2+2,y2+1,co)
otherwise
end
if co ~= '' then do
call SetAPen(HO,co) ; call RectFill(HO,x1,y1,x2,y2)
call SetAPen(HO,1) ; end
end
return
Plain: ; parse arg lf,up,rt,bot . ; call Rect(lf,up,rt,bot,f,f); return
Emboss: ;parse arg lf,up,rt,bot . ; call Rect(lf,up,rt,bot,2,1); return
Recess: ;parse arg lf,up,rt,bot . ; call Rect(lf,up,rt,bot,1,2); return
Rect:
parse arg lf,up,rt,bot,edge1,edge2 . ; call SetAPen(HO,edge1)
call Move(HO,lf,up) ; call Draw(HO,rt,up)
call SetAPen(HO,edge2) ; call Move(HO,lf,bot) ; call Draw(HO,rt,bot)
do u = 0 to 1 ; call Move(HO,rt-u,up+u) ; call Draw(HO,rt-u,bot) ; end
call SetAPen(HO,edge1)
do u = 0 to 1 ; call Move(HO,lf+u,bot-u) ; call Draw(HO,lf+u,up) ; end
call SetAPen(HO,1)
return